import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const querySysCustomUserInfo = (params) => {
  params.head.transCode = 'querySysCustomUserInfo';
  return request({
    url: '/platform/sysCustomUserInfo/querySysCustomUserInfo',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const querySysCustomUserInfoListPage = (params) => {
  params.head.transCode = 'querySysCustomUserInfoListPage';
  return request({
    url: '/platform/sysCustomUserInfo/querySysCustomUserInfoListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveSysCustomUserInfo = (params) => {
  params.head.transCode = 'saveSysCustomUserInfo';
  return request({
    url: '/platform/sysCustomUserInfo/saveSysCustomUserInfo',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveSysCustomUserInfoList = (params) => {
  params.head.transCode = 'saveSysCustomUserInfoList';
  return request({
    url: '/platform/sysCustomUserInfo/saveSysCustomUserInfoList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateSysCustomUserInfo = (params) => {
  params.head.transCode = 'saveOrUpdateSysCustomUserInfo';
  return request({
    url: '/platform/sysCustomUserInfo/saveOrUpdateSysCustomUserInfo',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateSysCustomUserInfoList = (params) => {
  params.head.transCode = 'saveOrUpdateSysCustomUserInfoList';
  return request({
    url: '/platform/sysCustomUserInfo/saveOrUpdateSysCustomUserInfoList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateSysCustomUserInfo = (params) => {
  params.head.transCode = 'updateSysCustomUserInfo';
  return request({
    url: '/platform/sysCustomUserInfo/updateSysCustomUserInfo',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteSysCustomUserInfo = (params) => {
  params.head.transCode = 'deleteSysCustomUserInfo';
  return request({
    url: '/platform/sysCustomUserInfo/deleteSysCustomUserInfo',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteSysCustomUserInfoList = (params) => {
  params.head.transCode = 'deleteSysCustomUserInfoList';
  return request({
    url: '/platform/sysCustomUserInfo/deleteSysCustomUserInfoList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportSysCustomUserInfoExcel = (params) => {
  downloadExcel({
    url: '/platform/sysCustomUserInfo/excelDownload/exportSysCustomUserInfoExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
